package com.king.modules.system.controller;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.king.common.constant.Constants;
import com.king.common.utils.SecurityUtils;
import com.king.framework.base.controller.YyBaseController;
import com.king.modules.system.domain.SysNoticeEntity;
import com.king.modules.system.service.SysNoticeService;

/**
 * 公告 信息操作处理
 * 
 * @author king
 */
@RestController
@RequestMapping("/system/notice")
public class SysNoticeController extends YyBaseController<SysNoticeEntity> {
	
	@SuppressWarnings("unused")
	@Autowired
	private SysNoticeService noticeService;

	@Override
	protected Map<String, Object> addSearchParam(HttpServletRequest request) throws Exception {
		Map<String, Object> addParam = new HashMap<String, Object>();
        if(!SecurityUtils.isAdmin()){
        	addParam.put("IN_groupid", Constants.TREE_ORG_ROOTID + "," + SecurityUtils.getGroupid());
        }
        return addParam;
	}

	
}
